<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2023-06-09
  Time: 16:41
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<a href="/add"><button>添加房源</button></a>
<table border="1">
    <tr>
        <th>编号</th>
        <th>租赁方式</th>
        <th>租金（元</th>
        <th>联系人</th>
        <th>押金方式</th>
        <th>房屋类型</th>
        <th>详细地址</th>
        <th>操作</th>
    </tr>
    <c:forEach items="${list}" var="house">
        <tr>
            <td>${house.id}</td>
            <td>${house.leaseMode}</td>
            <td>${house.rent}</td>
            <td>${house.contacts}</td>
            <td>${house.depositMethod}</td>
            <td>${house.type}</td>
            <td>${house.address}</td>
            <td><a href="/delete?id=${house.id}"><button>删除</button></a></td>
        </tr>
    </c:forEach>
</table>
<form action="/search" method="post">
    查询：<input type="text" name="name"> <input type="submit" value="查询">
</form>
</body>
</html>
